home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Attack⁄DoS / Holyfield v1.0.sit / Holyfield v1.0 / Knockout!.rsrc / TEXT_914.txt < prev    next >
Text File  |  1996-11-13  |  6KB  |  167 lines

  1. :This built-in help system is extremely limited.
  2. Please try reading the Chipmunk Basic man page and README
  3. file or the WWW page <http://www.nicholson.com/rhn/basic/>
  4.  
  5. Try entering any keywords marked by angle brackets
  6. into the help dialog box (Type in without the angle brackets.) -
  7.   <commands>  <statements>  <functions>  <operators>
  8.   <files>  <graphics>  <sound>  <objects>  <special>
  9. !<help>:
  10. Type a keyword into the dialog box without any angle brackets.
  11. !<operators>:
  12. + - * / ^ mod  and or xor not  > < >= <= <> =
  13.   see also - <constants>
  14. !<constants>:
  15. true false pi
  16. !<commands>:
  17. load  save  run  new  clear  exit   cont  renum
  18. (Program names must end with a ".bas" to appear in the Open dialog box.)
  19.   see also - <statements>  <files>
  20. !<statements>:
  21. let   if then else endif   gosub return  goto   rem
  22. for to step  next   while wend exit while   select case
  23. data read restore  dim erase  sub  end sub  degrees radians
  24.   see also - <subroutines> <objects> <files>  <input>  <print>
  25. !<subroutines>:
  26. gosub line_num
  27. return
  28. sub mumble(param1, param2)    ' Define sub with 2 params.
  29.   mumble = 7 + param1        ' set return value
  30. end sub
  31. x = mumble(1)    ' Calls sub.  Extra params are set to 0.
  32. !<functions>:
  33. sqr  log  exp  sin  cos  tan  atn
  34. abs  sgn  int  rnd  peek
  35. asin acos sinh cosh tanh log10 floor  ubound isarray
  36. mid$  right$  left$  str$  chr$  val len asc
  37. lcase$  ucase$  field$  inkey$  input$  format$
  38.   see also - <files> <field$>
  39. !<field$>:
  40. field$(my_str$, word_num)    ' Chops words out of a sentence.
  41. field$(s$, n, seperator_char$)    ' Space is seperator default.
  42. !<graphics>:
  43. moveto x,y        ' This sets the starting point.
  44. lineto x,y        ' Draw a line to this end point.
  45. pset x,y        ' Draw one dot.
  46. graphics circle r
  47. graphics rect x1,y1, x2,y2    ' Draws a rectangle.
  48. graphics fillrect x1,y1, x2,y2    ' also filloval for ovals
  49.   see also -  <colors> <sprites>  <pictures>
  50.   <graphics-window>  <graphics-functions>
  51. !<colors>:
  52. graphics color r,g,b          ' red, green, blue values (range 0-100)
  53. graphics color 100,100,100    ' white
  54. graphics color 100,  0,  0    ' red
  55. !<graphics-window>:
  56. graphics 0            ' This makes the window appear.
  57.                 ' Also refreshes graphics.
  58. graphics window w,h        ' Changes the size.
  59. graphics window x,y, w,h    ' Moves it.
  60. graphics -1            ' Hides the graphics window.
  61. graphics drawtext s$        ' Draws text.
  62.   see also - <graphics>
  63. !<graphics-functions>:
  64. botton_down = mouse(0)
  65. current_x   = mouse(1) :   current_y = mouse(2)
  66. last_click_x = mouse(3)
  67. !<sprites>:
  68. sprite 1, 100,50, 128        ' Draws sprite #1 at (100,50)
  69. sprite n, x,y, rsrc_id        ' Sprites are ICN# icon images.
  70.     ' built in sprite rsrc_id's are 128 to 142
  71. sprite n forward x        ' Moves sprite #n x pixels.
  72. sprite n turn d            ' Turns heading CCW d degrees.
  73.      turnleft turnright up down penup pendown
  74. ' Create your own sprites with ResEdit.
  75. !<pictures>:
  76. graphics pict x, y, filename$    ' Displays a PICT file.
  77. call "savepicture", fname$    ' Saves a PICT file.
  78. !<sound>:
  79. sound 800, 0.5, 50    ' Play a sound for half a sec.
  80. sound freq,dur,vol     ' Hz, seconds, vol [0 to 100]
  81. sound 0, rsrc_id    ' Plays a snd resource.
  82. sound -2,voice,key,velocity,seconds [,channel]
  83.             ' sound -2 requires Quicktime 2.1 Midi
  84.   see also - <speech> <morse-code>
  85. !<morse-code>:
  86. morse "cq de n6ywu"
  87. morse my_string$,20,40,13,700  ' dots,vol,wpm,Hz
  88. !<speech>:
  89. say "hello"        : ' requires Speech Manager extension
  90. say my_string$, 196, 44, 1    : ' rate, pitch, voice
  91. say            : ' reads out the console window
  92. cls            : ' clears the console window
  93. print macfunction("numSpeakers")
  94. print macfunction("getSpeaker")  :' current voices name
  95. !<objects>:
  96. OOP - Object Oriented Programming  -  Just some syntax hints here -
  97. class my_class [ extends super_class_name ]
  98.   [public|private] x as [integer|double|string]
  99.   ...                ' Etc.
  100.   sub member_function_name()    ' Define public member function.
  101.     this.x = ...
  102.     member_function_name = return_value
  103.   end sub
  104. end class            ' End class definition
  105. dim a as new my_class        ' Create an instance.
  106. a.member_function_name()    ' Call member function.
  107. !<files>:
  108. open filename$ for input as #1
  109. open "SFGetFile" for input as #3
  110. while not eof(3) : input #3,a$ : print a$ : wend : close #3
  111. open "SFPutFile" for output as #4
  112. a$ = inkey$    ' Polls for keyboard input.  Non-blocking.
  113.   see also - <directory> <serial-ports>
  114. !<input>:
  115. input s$        ' Prompts for an input string.
  116.             ' Puts the entire input line in s$.
  117. input x            ' Input one line.  Convert to a number.
  118. input my_prompt$, y    ' Set your own prompt.
  119. input #3, s$        ' Input from a file (must be open first.)
  120. x = fgetbyte #3        ' Gets one byte from a file.
  121. !<print>:
  122. print "hello"
  123. print "hello";        ' Prints without a carriage return or line feed.
  124. print 1+2
  125. print #4,s$            ' Prints to a file (must be open first.)
  126. print format$(x, "$###.##")    ' Prints a formatted number.
  127. gotoxy x,y        ' Position cursor in console window. (0 origin)
  128. !<directory>:
  129. files            ' Lists the current directory.
  130. files path$, any$    ' Sets the current dir.
  131. errorstatus$         ' Will return the path afterwards.
  132. !<serial-ports>:
  133. open "COM1:" for input as #3        ' Requires CTB Serial Tool.
  134. open "COM1:" for output as #4        ' Open input first.
  135. if not eof(3) then i = fgetbyte(3)
  136. open "COM3: 19200" for input as #5     ' Uses the old serial driver.
  137. !<user-interface>:
  138. a$ = inputbox("prompt", "title", "default", 0)
  139.         ' Puts up a dialog box and ask for input.
  140. graphics button title$, x,y,w,h,asc("t")
  141.         ' Puts up a button that enters the letter "t".
  142. graphics button "",-1        ' Clears all buttons.
  143.   see also - <graphics-window>
  144. !<special>!<mac>:
  145. other Mac specific functions -
  146. date$  time$  timer  doevents
  147. call "wait", 1        ' Waits one second.
  148. fre        ' free memory in application heap
  149. cls        ' Clears the screen.
  150.   see also - <user-interface>  <advanced-features>  <version>
  151. !<advanced-features>:
  152. These are just hints. -
  153. call "doscript","MOSS", url$, "GURL", "GURL"
  154.         'sends a get URL AppleEvent to Netscape(tm)
  155. call "setfiletype", "TEXT"
  156. x = macfunction("keydown", key_code)  ' Is this key down?
  157. !<version>:
  158. rhn  96Jul18  v004
  159. !!
  160.  
  161. to do list:
  162. append  random get put  input$
  163. fseek# fputbyte
  164. home htab vtab pos 
  165. varptr peek poke  type single  static
  166. msgbox  do loop until  menu dialog
  167. --